function   model_sol = post_processing_change_eta( model_sol,  eta_new )
% Usage: post_processing_change_eta( model_sol,  eta_new )
% This function updates the post-processed model_sol by a new eta.  This new eta should update all quantities related.
% These include muw_matrix and its fitted value.

par = model_sol.par;   
N_lambda = par.N_lambda;   N_w=par.N_w;
w_grid = par.w_grid;    lambda_grid=par.lambda_grid;

w_dim = kron(ones(N_lambda,1), w_grid );
lambda_dim = kron(lambda_grid, ones(N_w,1));
fit_a_function = @(values_matrix)  scatteredInterpolant(w_dim,    lambda_dim ,  reshape( values_matrix, N_w*N_lambda, 1 ),   'linear')  ;

xK_matrix = model_sol.xK_matrix;
w_matrix=model_sol.w_matrix;
mub_matrix = model_sol.mub_matrix;
muh_matrix = model_sol.muh_matrix;
sigmah_matrix = model_sol.sigmah_matrix;
sigmab_matrix = model_sol.sigmab_matrix;

eta = eta_new;
muw_definition  % Source the muw definition codes

model_sol.par.eta = eta_new; 
model_sol.muw_matrix = muw_matrix;
model_sol.muw_fitted_matrix = fit_a_function( muw_matrix );



